<template>
  <div>
    <div v-for="(item, index) in controlList" :key="index">
      <PageHeader :module="item" v-if="item.type == 1 && item.attrs.show" />
      <HistoryBuy
        v-if="item.type == 2 && item.attrs.show"
        :moduleData="item"
        :name="name"
      />
    </div>
  </div>
</template>

<script>
import PageHeader from "@/views/module/pageHeader.vue";
import HistoryBuy from "@/views/module/historyBuy.vue";
export default {
  name: "ControlModule",
  components: {
    PageHeader,
    HistoryBuy,
  },
  props: {
    controlList: {
      type: Array,
      default: [],
    },
  },
};
</script>

<style></style>
